
#[cfg(test)]
mod tests {
    use super::*;

    #[tokio::test]
    async fn test_generate_couplet_by_dashscope_success() {
        let keyword = "测试";
        let api_key = "your_api_key";

        let result = generate_couplet_by_dashscope(keyword, api_key).await;

        assert!(result.is_ok());

        let (upper, lower, banner) = result.unwrap();

        // 可以添加更多的断言来验证生成的对联内容是否符合预期
    }

    #[tokio::test]
    async fn test_generate_couplet_by_dashscope_failure() {
        let keyword = "无效关键字";
        let api_key = "your_api_key";

        let result = generate_couplet_by_dashscope(keyword, api_key).await;

        assert!(result.is_err());
    }
}
